package com.project.webapp.action.front;

import com.project.service.front.IRegisterService;
import com.project.webapp.action.BaseAction;
import com.project.webapp.form.front.RegisterForm;

public class RegisterAction extends BaseAction {

	/**
	 * <pre>
	 * 
	 * </pre>
	 */
	private static final long serialVersionUID = 1L;
	private RegisterForm registerForm;
	IRegisterService registerService;

	public RegisterAction() {
		if (registerForm == null) {
			registerForm = new RegisterForm();
		}
	}

	public String register() {
		try {
			registerService.saveCustomer(registerForm);
		} catch (Exception e) {
			e.printStackTrace();
		}

		return SUCCESS;
	}

	public RegisterForm getRegisterForm() {
		return registerForm;
	}

	public void setRegisterForm(RegisterForm registerForm) {
		this.registerForm = registerForm;
	}

	public IRegisterService getRegisterService() {
		return registerService;
	}

	public void setRegisterService(IRegisterService registerService) {
		this.registerService = registerService;
	}

}
